/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package cn.piaoyi.service;

import java.util.List;

import cn.piaoyi.bean.Admin;
import cn.piaoyi.bean.Payment;
import cn.piaoyi.exception.PiaoyiException;

/**
 * 功能描述:支付方式事务接口
 *
 * 创建日期 Apr 10, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public interface PaymentService {
	/**
	 * 保存Payment对象
	 * 
	 * @param payment
	 * 			Payment对象
	 * @return Payment
	 * 			Payment对象
	 */
	public Payment createPayment(Payment payment) throws PiaoyiException;
	
	/**
	 * 根据code获取Payment对象
	 * 
	 * @param code
	 * 			String
	 * @return Payment
	 * 			Payment对象
	 */
	public Payment findPaymentByCode(String code);
	
	/**
	 * 保存Payment对象
	 * 
	 * @param payment
	 * 			Payment对象
	 * @return Payment
	 * 			Payment对象
	 */
	public Payment updatePayment(Payment payment) throws PiaoyiException;
	
	/**
	 * 根据主键ID获取Payment对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return Payment
	 * 			Payment对象
	 */
	public Payment findPaymentById(long id);
	
	/**
	 * 获取Payment列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Admin对象列表
	 */
	public List findPayments(String orderby, int ascOrDesc);
	
	/**
	 * 删除Payment对象
	 */
	public void removePaymentById(long id);
}
